too much function for one thread